home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
love4th.zip
/
WORKING.DOC
< prev
Wrap
Text File
|
1991-10-01
|
4KB
|
92 lines
Working In L.O.V.E. Forth
Here are some notes on how to do day to day work in L.O.V.E.
Forth. A good starting point for viewing the features, is given in the
share-ware demo LOVES.EXE .
Help
For help while using the system, load the Hyper Helper with the
DOS command: HM LOVE before running Forth. Or execute GO.BAT or
BARE.BAT . The help system is subsequently invoked the the key
sequence: ALT-F1 .
Directories
Usually, the programmer copies Forth to the working directory
including source code etc. When copying the EXE to another directory,
be sure to also copy the *.VTR files. These are the virtual
vocabularies. Alternatively the DOS APPEND command can be used to direct
DOS to the appropriate directory.
Versions of L.O.V.E. Forth
The minimum system, with the smallest number of features
compiled is called MINnnn.EXE where nnn is the version number (eg.
MIN126.EXE ). This is the program executed by BARE.BAT . On top of
this can be the block disk words (LOADBLK.TXT) and / or the RPN
assembler. Be sure to save the system again with SAVE" after loading
the desired features (eg. SAVE" LOVERPN.EXE" ).
Various source code modules can be loaded ontop of the BARE
system. These include local variables, multiple CFA words,
miscellaneous words. Dependancies:
LOADBLK.TXT also loads MISC.TXT
ARRAY.TXT requires MCFA.TXT
All others can be loaded independantly.
Upper and Lower Case
Normally, the case of a word is ignored. By setting variable
CASEMATCH to true, however, will cause L.O.V.E. Forth to match the case
of the word as it originally was compiled. All the L.O.V.E. Forth
standard words were compiled in upper case. Compilation is slightly
faster in case match mode, but it is usually desireable to type
interactive commands with case ignored.
Text strings
Frequently the programmer requires control characters in
strings. This is difficult to do in any text file, as control
characters may be editor commands, or printer control codes. L.O.V.E.
Forth supports AWK style escape commands. These are summarized as
follows:
\b : backspace
\f : formfeed
\n : newline, linefeed
\r : carriage return
\t : tab
\ddd : decimal value, 1 to 3 digits
\c : where 'c' is any other character literally
\\ : for backslash
\" : for "
These can be used in text strings compiled with the words:
." " ," .(
Vocabularies
See also the section describing vocabularies. The usual
vocabulary for working in Forth is FORTH. The words controlling the
dictionary search order are in vocabulary ROOT . The word DEVELOP
sets the search order to be ROOT FORTH and TOOLBOX which contains
programming aids. The vocabulary implementation is that of a stack,
ALSO pushes the stack and VDROP drops the top of the stack. ONLY
resets it to ROOT only.
Access to DOS
Typing the word DOS followed by a DOS command line, executes
that in a DOS shell. Typing DOS followed by nothing, enters the DOS
shell (typing EXIT returns to Forth). This is one way to invoke a text
editor. Note that there must be enough memory to invoke DOS. If too
much memory is allocated in MAXHEAP (see instructions on saving the
system), DOS cannot be entered.
Windows 3.0
The multitasking features of this environment are useful. One
can run L.O.V.E. Forth from a DOS prompt, and have an editor running in
another window. The L.O.V.E. Forth icon is provided.